<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="UTF-8">
	<meta name="viewport"
		content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
	<meta http-equiv="X-UA-Compatible" content="ie=edge">
	<link rel="stylesheet" href="__CSS__/ex/common.css">
	<link rel="stylesheet" href="__CSS__/ex/login.css">
	<title>EX</title>
    <script src="__JS__/ios-web-app.js"></script>
</head>

<body>
	<div class="login">
		<div class="header">
			<div class="header_left"><a href="{:U('Index/index')}"><img src="__IMG__/ex/back.png" alt=""></a></div>
			<p>Xác nhận mật khẩu</p>
			<div class="header_right"></div>
		</div>
		<div class="loginform register">
				<div class="form_content username">
						<img src="__IMG__/ex/user.png" alt="">
						<div class="line"></div>
						<input type="text" placeholder="Nhập mật khẩu mới" id="password">
				</div>
				<div class="form_content username">
						<img src="__IMG__/ex/user.png" alt="">
						<div class="line"></div>
						<input type="text" placeholder="Nhập lại lần nữa mật khẩu mới" id="password_re">
				</div>
			<div class="form_content username">
				<img src="__IMG__/ex/user.png" alt="">
				<div class="line"></div>
				<input type="text" placeholder="Nhập mật khẩu thanh toán" id="password2">
			</div>
			<div class="form_content username">
				<img src="__IMG__/ex/user.png" alt="">
				<div class="line"></div>
				<input type="text" placeholder="Nhập lại lần nữa mật khẩu thanh toán" id="password2_re">
			</div>
			<div class="btn login_btn lsub" id="sub">Xác nhận</div>
		</div>
	</div>

	<script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
	<script>
			$(function() {
				// $(document).on('click','#getCode',function(){
				// $("#getCode").on('click', function () {
				// 	var num = 59;
				// 	var that = $(this);
				// 	var phone = $('#phone').val();
				// 	if (phone == '') {
				// 		alert('请输入注册的手机号码');
				// 	} else if (!(/^1[34578]\d{9}$/.test(phone))) {
				// 		alert('手机号码格式不正确');
				// 	} else {
				// 		$.post("{:U('Public/sendCode')}", {"phone": phone}, function (data) {
				// 			alert(data.message);
				// 			console.log(data)
				// 			var timer = setInterval(function () {
				// 				that.attr('id', '');
				// 				that.text(num + 's');
				// 				that.addClass('active');
				// 				num--;
				// 				if (num == 0) {
				// 					that.attr('id', 'getCode');
				// 					clearInterval(timer);
				// 					that.text('重新发送验证码');
				// 				}
				// 			}, 1000);
				// 		})
				// 	}
				// });
		
				$('#sub').click(function(){
					$.ajax({
						type:"post",
						url:"{:U('Public/find_password')}",
						data:{
							// phone:$('#phone').val(),
							// code:$('#code').val(),
							id:{$id},
							password:$('#password').val(),
							password_re:$('#password_re').val(),
                            password2:$('#password2').val(),
                            password2_re:$('#password2_re').val(),
						},
						dataType:"json",
						success:function(data){
							if(data.code==1){
								alert(data.msg);
                                window.location.href=data.data;
							}else{
								alert(data.msg);
							}
						}
					});
				});
			})
		</script>
</body>

</html>